package com.cb.domain.service.order.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cb.core.service.impl.GenericManagerImpl;
import com.cb.domain.model.order.Policy;
import com.cb.domain.dao.order.PolicyDAO;
import com.cb.domain.service.order.PolicyManager;
import com.cb.core.webapp.paging.PagingBean;

@Service
public class PolicyManagerImpl extends GenericManagerImpl<Policy, Long> implements PolicyManager{
	
	@Autowired
	private PolicyDAO policyDAO;
	
	@Autowired
	public PolicyManagerImpl(PolicyDAO policyDAO) {
		super(policyDAO);
	}
	
	/**
	 * {@inheritDoc}
	 */
	public List<Policy>getByVo(Policy vo,PagingBean pb){
		return ((PolicyDAO)genericDAO).getByVo(vo, pb);
	}

	@Override
	public void deleteAll() {
		policyDAO.deleteAll();
	}
}
